package com.zr.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletResponseAware;

import com.zr.service.DeleteLinesService;

public class DeleteLines implements ServletResponseAware{
	private HttpServletResponse resp;
	private int[] lid;
	
	public int[] getLid() {
		return lid;
	}
	public void setLid(int[] lid) {
		this.lid = lid;
	}
	@Resource 
	private DeleteLinesService deleteline;
	
	public void deletelines(){
		deleteline.deleteline(lid);
		PrintWriter pw;
		try {
			pw = resp.getWriter();
			pw.write("1");
			pw.flush();
			pw.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void setServletResponse(HttpServletResponse resp) {
		this.resp=resp;
	}

}
